inherited fmUserMenu: TfmUserMenu
  Left = 513
  Top = 243
  Width = 807
  Height = 532
  Caption = #1044#1086#1089#1090#1091#1087' '#1087#1086#1083#1100#1079#1086#1074#1072#1090#1077#1083#1077#1081' '#1082' '#1040#1056#1052#1072#1084
  Constraints.MinHeight = 420
  Constraints.MinWidth = 499
  OnResize = FormResize
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 478
    Width = 799
  end
  object Panel1: TPanel
    Left = 0
    Top = 0
    Width = 799
    Height = 25
    Align = alTop
    BevelInner = bvLowered
    TabOrder = 1
    object sbReciever: TSpeedButton
      Left = 7
      Top = 1
      Width = 23
      Height = 22
      Flat = True
      Glyph.Data = {
        76010000424D7601000000000000760000002800000020000000100000000100
        0400000000000001000000000000000000001000000000000000000000000000
        8000008000000080800080000000800080008080000080808000C0C0C0000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
        333333333333333333FF33333333333330003FF3FFFFF3333777003000003333
        300077F777773F333777E00BFBFB033333337773333F7F33333FE0BFBF000333
        330077F3337773F33377E0FBFBFBF033330077F3333FF7FFF377E0BFBF000000
        333377F3337777773F3FE0FBFBFBFBFB039977F33FFFFFFF7377E0BF00000000
        339977FF777777773377000BFB03333333337773FF733333333F333000333333
        3300333777333333337733333333333333003333333333333377333333333333
        333333333333333333FF33333333333330003333333333333777333333333333
        3000333333333333377733333333333333333333333333333333}
      NumGlyphs = 2
      Visible = False
      OnClick = sbRecieverClick
    end
  end
  object dbgUsers: TcxGrid
    Left = 0
    Top = 25
    Width = 799
    Height = 224
    Align = alTop
    TabOrder = 2
    LookAndFeel.Kind = lfStandard
    LookAndFeel.NativeStyle = False
    object dbgUsersDBTableView1: TcxGridDBTableView
      OnKeyDown = dbgUsersDBTableView1KeyDown
      NavigatorButtons.ConfirmDelete = False
      NavigatorButtons.First.Visible = True
      NavigatorButtons.Insert.Visible = False
      NavigatorButtons.Append.Visible = False
      NavigatorButtons.Delete.Visible = False
      NavigatorButtons.Edit.Visible = False
      NavigatorButtons.Post.Visible = False
      NavigatorButtons.Cancel.Visible = False
      NavigatorButtons.Refresh.Visible = False
      NavigatorButtons.SaveBookmark.Visible = False
      NavigatorButtons.GotoBookmark.Visible = False
      NavigatorButtons.Filter.Visible = False
      DataController.DataModeController.GridMode = True
      DataController.DataSource = dsUsers
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <>
      DataController.Summary.SummaryGroups = <>
      OptionsBehavior.CellHints = True
      OptionsBehavior.IncSearch = True
      OptionsCustomize.ColumnFiltering = False
      OptionsData.CancelOnExit = False
      OptionsData.Deleting = False
      OptionsData.DeletingConfirmation = False
      OptionsData.Inserting = False
      OptionsView.NavigatorOffset = 10
      OptionsView.ColumnAutoWidth = True
      OptionsView.GroupByBox = False
      OptionsView.Indicator = True
      OptionsView.ShowColumnFilterButtons = sfbAlways
      Styles.Content = DMInv.cxData
      Styles.IncSearch = DMInv.cxKrasniyText
      Styles.Selection = DMInv.cxJoltiyFon
      Styles.Header = DMInv.cxSiniyText
      OnColumnHeaderClick = dbgUsersDBTableView1ColumnHeaderClick
      object dbgUsersDBTableView1USNAME: TcxGridDBColumn
        Caption = #1051#1086#1075#1080#1085
        DataBinding.FieldName = 'USNAME'
        HeaderAlignmentVert = vaCenter
        Options.Editing = False
        Width = 215
      end
      object dbgUsersDBTableView1USFULLNAME: TcxGridDBColumn
        Caption = #1060#1048#1054
        DataBinding.FieldName = 'USFULLNAME'
        PropertiesClassName = 'TcxButtonEditProperties'
        Properties.Buttons = <
          item
            Default = True
          end>
        Properties.OnButtonClick = dbgUsersDBTableView1USFULLNAMEPropertiesButtonClick
        HeaderAlignmentVert = vaCenter
        Width = 564
      end
    end
    object dbgUsersLevel1: TcxGridLevel
      GridView = dbgUsersDBTableView1
    end
  end
  object dbgSelect: TcxGrid
    Left = 0
    Top = 257
    Width = 799
    Height = 221
    Align = alClient
    TabOrder = 3
    LookAndFeel.Kind = lfStandard
    LookAndFeel.NativeStyle = False
    object dbgSelectDBTableView1: TcxGridDBTableView
      NavigatorButtons.ConfirmDelete = False
      NavigatorButtons.First.Visible = True
      NavigatorButtons.PriorPage.Visible = True
      NavigatorButtons.Prior.Visible = True
      NavigatorButtons.Next.Visible = True
      NavigatorButtons.NextPage.Visible = True
      NavigatorButtons.Last.Visible = True
      NavigatorButtons.Insert.Visible = False
      NavigatorButtons.Append.Visible = False
      NavigatorButtons.Delete.Visible = False
      NavigatorButtons.Edit.Visible = False
      NavigatorButtons.Post.Visible = False
      NavigatorButtons.Cancel.Visible = False
      NavigatorButtons.Refresh.Visible = False
      NavigatorButtons.SaveBookmark.Visible = False
      NavigatorButtons.GotoBookmark.Visible = False
      NavigatorButtons.Filter.Visible = False
      DataController.DataModeController.GridMode = True
      DataController.DataSource = dsSelect
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <>
      DataController.Summary.SummaryGroups = <>
      OptionsBehavior.CellHints = True
      OptionsBehavior.IncSearch = True
      OptionsCustomize.ColumnFiltering = False
      OptionsData.Deleting = False
      OptionsData.Inserting = False
      OptionsView.NavigatorOffset = 10
      OptionsView.ColumnAutoWidth = True
      OptionsView.GroupByBox = False
      OptionsView.Indicator = True
      OptionsView.ShowColumnFilterButtons = sfbAlways
      Styles.Content = DMInv.cxData
      Styles.IncSearch = DMInv.cxKrasniyText
      Styles.Selection = DMInv.cxJoltiyFon
      Styles.Header = DMInv.cxSiniyText
      object dbgSelectDBTableView1LABEL: TcxGridDBColumn
        DataBinding.FieldName = 'LABEL'
        HeaderAlignmentVert = vaCenter
        Options.Editing = False
        Width = 736
      end
      object dbgSelectDBTableView1ISYES: TcxGridDBColumn
        DataBinding.FieldName = 'ISYES'
        PropertiesClassName = 'TcxCheckBoxProperties'
        Properties.ImmediatePost = True
        Properties.NullStyle = nssUnchecked
        Properties.ValueChecked = 1
        Properties.ValueUnchecked = 0
        HeaderAlignmentVert = vaCenter
        Width = 43
      end
    end
    object dbgSelectLevel1: TcxGridLevel
      GridView = dbgSelectDBTableView1
    end
  end
  object cxSplitter1: TcxSplitter
    Left = 0
    Top = 249
    Width = 799
    Height = 8
    AlignSplitter = salTop
    Control = dbgUsers
  end
  object cbAll: TCheckBox
    Left = 753
    Top = 260
    Width = 17
    Height = 17
    Anchors = [akTop, akRight]
    TabOrder = 5
    OnClick = cbAllClick
  end
  object dsUsers: TDataSource
    DataSet = qUsers
    Left = 16
    Top = 168
  end
  object dsSelect: TDataSource
    DataSet = qSelect
    Left = 8
    Top = 328
  end
  object qUsers: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterScroll = qUsersAfterScroll
    BeforeScroll = qUsersBeforeScroll
    CachedUpdates = True
    SQL.Strings = (
      
        'SELECT U.*, (P.PLASTNAME||'#39' '#39'||P.PNAME||'#39' '#39'||P.PPATRONYMIC)  AS ' +
        'USFULLNAME'
      '  FROM USERS U'
      'LEFT OUTER JOIN PEOPLE P ON P.PID = U.PID'
      ' ORDER BY USFULLNAME')
    UpdateObject = quUser
    Left = 56
    Top = 168
    object qUsersUSID: TIntegerField
      FieldName = 'USID'
      Origin = '"USERS"."USID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qUsersUSNAME: TIBStringField
      FieldName = 'USNAME'
      Origin = '"USERS"."USNAME"'
      Size = 40
    end
    object qUsersPID: TIntegerField
      FieldName = 'PID'
      Origin = '"USERS"."PID"'
    end
    object qUsersUSFULLNAME: TIBStringField
      FieldName = 'USFULLNAME'
      ProviderFlags = []
      Size = 767
    end
  end
  object qSelect: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    BeforeEdit = qSelectBeforeEdit
    CachedUpdates = True
    DataSource = dsUsers
    SQL.Strings = (
      'SELECT M.*, 1 ISYES'
      '  FROM MENU M'
      ' WHERE EXISTS(SELECT *'
      '                FROM USERMENU U'
      '               WHERE M.MENUID = U.MENUNO'
      '                 AND U.USID = :USID)'
      'UNION'
      'SELECT M.*, 0 ISYES'
      '  FROM MENU M'
      ' WHERE NOT EXISTS(SELECT *'
      '                    FROM USERMENU U'
      '                   WHERE M.MENUID = U.MENUNO'
      '                     AND U.USID = :USID)')
    UpdateObject = IBUpdateSQL1
    Left = 48
    Top = 328
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'USID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'USID'
        ParamType = ptUnknown
      end>
    object qSelectLABEL: TIBStringField
      DisplayLabel = #1053#1072#1079#1074#1072#1085#1080#1077' '#1040#1056#1052#1072
      DisplayWidth = 64
      FieldName = 'LABEL'
      ReadOnly = True
      Size = 40
    end
    object qSelectISYES: TIntegerField
      DisplayLabel = '?'
      DisplayWidth = 10
      FieldName = 'ISYES'
      Required = True
    end
    object qSelectMENUID: TIntegerField
      FieldName = 'MENUID'
      Origin = '"MENU"."MENUID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
  end
  object IBUpdateSQL1: TIBUpdateSQL
    ModifySQL.Strings = (
      'null;')
    InsertSQL.Strings = (
      'null;')
    DeleteSQL.Strings = (
      'null;')
    Left = 80
    Top = 328
  end
  object qUpdate: TIBDataSet
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    BeforeClose = qUpdateBeforeClose
    CachedUpdates = True
    DeleteSQL.Strings = (
      'delete from USERMENU'
      'where'
      '  MENUNO = :OLD_MENUNO and'
      '  USID = :OLD_USID')
    InsertSQL.Strings = (
      'insert into USERMENU'
      '  (MENUNO, USID)'
      'values'
      '  (:MENUNO, :USID)')
    RefreshSQL.Strings = (
      'Select '
      '  USID,'
      '  MENUNO'
      'from USERMENU '
      'where'
      '  MENUNO = :MENUNO and'
      '  USID = :USID')
    SelectSQL.Strings = (
      'SELECT *'
      '  FROM USERMENU U'
      ' WHERE U.USID = :USID')
    ModifySQL.Strings = (
      'update USERMENU'
      'set'
      '  MENUNO = :MENUNO,'
      '  USID = :USID'
      'where'
      '  MENUNO = :OLD_MENUNO and'
      '  USID = :OLD_USID')
    DataSource = dsUsers
    Left = 48
    Top = 368
    object qUpdateUSID: TIntegerField
      FieldName = 'USID'
      Origin = '"USERMENU"."USID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qUpdateMENUNO: TIntegerField
      FieldName = 'MENUNO'
      Origin = '"USERMENU"."MENUNO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
  end
  object quUser: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  USID,'
      '  USNAME,'
      '  PID'
      'from USERS '
      'where'
      '  USID = :USID')
    ModifySQL.Strings = (
      'update USERS'
      'set'
      '  PID = :PID,'
      '  USID = :USID,'
      '  USNAME = :USNAME'
      'where'
      '  USID = :OLD_USID')
    InsertSQL.Strings = (
      'null;')
    DeleteSQL.Strings = (
      'null;')
    Left = 88
    Top = 168
  end
end
